fix(website): fix Hugo navbar base-url links#5
Conversation
Co-authored-by: Michael Villalba Sotelo <visomi-dev@users.noreply.github.com>
This reverts commit ba5117c.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0da4940e59
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| href="{{ "journey" | absURL }}" | ||
| class="transition-colors hover:text-black dark:hover:text-white {{ if in .Page.RelPermalink "/journey" }}text-black dark:text-white{{ end }}" | ||
| href="{{ "journey" | relLangURL }}" | ||
| class="transition-colors hover:text-black dark:hover:text-white {{ if eq .Section "journey" }}text-black dark:text-white{{ end }}" |
There was a problem hiding this comment.
Preserve active nav state for root regular pages
The new eq .Section ... checks stop highlighting the current page for the existing English routes defined by apps/website/content/journey.md:1-5, projects.md:1-5, and resume.md:1-5. Those files live at the content root and set url directly, so Hugo does not put them in a top-level section; on /journey/, /projects/, and /resume/ the corresponding navbar item will now stay inactive, whereas the previous in .Page.RelPermalink ... logic handled those pages correctly.
Useful? React with 👍 / 👎.
Summary
/visomi.dev/and/visomi.dev/es/render correctlyTesting
pnpm exec tailwindcss -i apps/website/assets/css/styles.css -o apps/website/static/css/styles.css --minify && pnpm dlx hugo-bin -s apps/website -d dist/apps/website --gc --minify --baseURL /visomi.dev/apps/website/dist/apps/website/index.htmlandapps/website/dist/apps/website/es/index.htmlcontains the expected/visomi.dev/...navbar and resume links